package cn.hznc.domain.entity;

import cn.hutool.db.DaoTemplate;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.TimeZone;

/**
 * @Author：Administrator
 * @Date：2024/5/9 10:45
 */
@Getter
@Setter
@Table(name = "t_machine_tool_status_daily_info")
@TableName(value = "t_machine_tool_status_daily_info")
public class MachineToolStatusDailyInfoEntity{

    /**
     * 主键
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;


    /**
     * 小时
     */
    @Column(name = "hour",type = MySqlTypeConstant.INT,length = 11)
    @TableField("hour")
    private Integer hour;

    /**
     * 设备sn码
     */
    @Column(name = "sn_code",type = MySqlTypeConstant.VARCHAR,length = 150)
    @TableField("sn_code")
    private String snCode;

    /**
     * 设备名称
     */
    @Column(name = "machine_tool_name",type = MySqlTypeConstant.VARCHAR,length = 150)
    @TableField("machine_tool_name")
    private String machineToolName;

    /**
     * 开机率
     */
    @Column(name = "opening_rate",type = MySqlTypeConstant.INT)
    @TableField("opening_rate")
    private Integer openingRate;

    /**
     * 运行率
     */
    @Column(name = "running_rate",type = MySqlTypeConstant.INT)
    @TableField("running_rate")
    private Integer runningRate;
    /**
     * 记录创建时间
     */
    @Column(name = "create_time",type = MySqlTypeConstant.DATETIME)
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 记录创建日期
     */
    @Column(name = "day_time",type = MySqlTypeConstant.VARCHAR , length = 150)
    @TableField("day_time")
    private String dayTime;
}
